/* eslint-disable */
// @ts-check
const path = require('path');

const baseConfig = {
  /**
   * 原始 swagger json 下载保存路径
   * @readonly
   * @param {string} name
   */
  swaggerPath: (name) =>
    path.resolve(
      __dirname,
      `../src/services/swagger-file/${name}.raw.swagger.json`,
    ),

  /**
   * yapi json 下载保存路径
   * @readonly
   * @param {string} name
   */
  yapiPath: (name) =>
    path.resolve(__dirname, `../src/services/swagger-file/${name}.yapi.json`),

  /**
   * 生成的 swagger json 本地地址
   * @readonly
   * @param {string} name
   */
  localUrl: (name) => `./src/services/${name}.swagger.json`,
};
exports.baseConfig = baseConfig;

/**
 * @type {Record<string, {
 *   readonly swaggerUrl: string;
 *   readonly remoteUrl: string;
 *   readonly paths ?: readonly(string | RegExp)[];
 *   readonly definitions ?: readonly string[];
 * }>}
 */
const configs = {
  ar: {
    swaggerUrl: 'http://82.156.217.14:8000/api/api-doc',
    remoteUrl:
      'http://82.156.217.14:3000/api/open/plugin/export-full?type=json&pid=26&status=all&token=f218e1b479d4f2a86fedae96255c92f2deb8d80364323bf85b0842fc3967f9e3',
  },
  quest: {
    swaggerUrl: 'http://82.156.217.14:7778/api/v2/api-docs',
    remoteUrl:
      'http://82.156.217.14:3000/api/open/plugin/export-full?type=json&pid=20&status=all&token=be508af0a6ed67c8f5e4be6eaa470d98573d3ec737a243cd93d4a5322bd88d18',
  },
};

exports.configs = configs;
